cmake_minimum_required(VERSION 3.31)
project(${projectName} C)

set(CMAKE_C_STANDARD 11)
set(C_STANDARD 89)
set(CMAKE_SYSTEM_NAME Generic)

file(GLOB_RECURSE SOURCE_FILES
        "${CMAKE_CURRENT_SOURCE_DIR}/main/User/*.c"
        "${CMAKE_CURRENT_SOURCE_DIR}/main/Drive/*.c"
)
add_executable(${projectName} ${SOURCE_FILES})

target_include_directories(${projectName} PRIVATE
        ${keil_include_dir}
        main/Lib
        main/Drive
        main/RTOS
)

target_compile_definitions(${projectName} PRIVATE
        sfr=volatile\ unsigned\ char
        sbit=unsigned\ char
        bit=unsigned
        xdata=
)
